/*
 * Copyright (C) 2011, EADS France
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */

package xowl.interpreter;

import java.util.Collection;

/**
 *
 * @author Laurent WOUTERS
 */
public interface Thread {
    boolean isRunning();
    Repository getRepository();

    xowl.lang.owl2.Ontology getRuntimeOntology();
    void setRuntimeOntology(xowl.lang.owl2.Ontology onto);
    
    void addHook(Hook hook);
    void addHooks(Collection<Hook> hooks);
    void removeHook(Hook hook);
    void removeHooks(Collection<Hook> hooks);
    
    xowl.lang.runtime.Value run(xowl.lang.runtime.Value function, xowl.lang.runtime.Value[] params) throws xowl.interpreter.XOWLException;
    void runBegin(xowl.lang.runtime.Value function, xowl.lang.runtime.Value[] params) throws xowl.interpreter.XOWLException;
    xowl.lang.runtime.Value runEnd() throws xowl.interpreter.XOWLException;
    
    xowl.lang.runtime.Value evaluate(xowl.lang.owl2.Expression expression) throws XOWLException;
}
